package routers

import (
	"MembershipRegist/controllers/admin"
	"MembershipRegist/controllers/auth"
	"MembershipRegist/controllers/organization"
	"MembershipRegist/controllers/public"
	"MembershipRegist/controllers/user"
	"github.com/astaxie/beego"
)

func init() {
	/*
		public
	*/
	beego.Router("/login", &public.Controller{}, "post:UserLogin")
	beego.Router("/register", &public.Controller{}, "post:UserRegister")
	beego.Router("/organization/login", &public.Controller{}, "post:OrganizationLogin")
	beego.Router("/admin/login", &public.Controller{}, "post:AdminLogin")

	beego.Router("/activities", &public.Controller{}, "get:Activities")
	beego.Router("/activity/comments", &public.Controller{}, "get:ActivityComments")
	beego.Router("/organizations", &public.Controller{}, "get:Organizations")
	beego.Router("/organizations/query", &public.Controller{}, "post:OrganizationQuery")
	/*
		user
	*/
	beego.Router("/info", &auth.UserController{}, "post:UserInfo")

	beego.Router("/activity/apply", &user.Controller{}, "post:ActivityApply")
	beego.Router("/activity/cancel", &user.Controller{}, "post:ActivityApplyCancel")
	beego.Router("/activity/comment/insert", &user.Controller{}, "post:ActivityCommentInsert")
	beego.Router("/activity/comment/delete", &user.Controller{}, "post:ActivityCommentDelete")
	beego.Router("/setPassword", &user.Controller{}, "post:SetPassword")
	beego.Router("/member/register", &user.Controller{}, "post:MemberRegister")
	beego.Router("/members", &user.Controller{}, "post:MyMembers")
	/*
		organization
	*/
	beego.Router("/organization/info", &auth.OrganizationAdminController{}, "post:AdminInfo")

	beego.Router("/organization/setPassword", &organization.Controller{}, "post:SetPassword")
	beego.Router("/organization/activity/insert", &organization.Controller{}, "post:ActivityInsert")
	beego.Router("/organization/activity/delete", &organization.Controller{}, "post:ActivityDelete")
	beego.Router("/organization/activity/update", &organization.Controller{}, "post:ActivityUpdate")
	beego.Router("/organization/activity/members", &organization.Controller{}, "post:ActivityMembers")
	beego.Router("/organization/activity/member/verification", &organization.Controller{}, "post:ActivityMemberVerification")
	beego.Router("/organization/activity/comment/replay", &organization.Controller{}, "post:ActivityCommentReplay")
	beego.Router("/organization/activity/comment/delete", &organization.Controller{}, "post:ActivityCommentDelete")

	beego.Router("/organization/members", &organization.Controller{}, "get:Members")
	beego.Router("/organization/member/insert", &organization.Controller{}, "post:MemberInsert")
	beego.Router("/organization/member/delete", &organization.Controller{}, "post:MemberDelete")
	beego.Router("/organization/member/verification", &organization.Controller{}, "post:MemberVerification")
	beego.Router("/organization/member/query", &organization.Controller{}, "post:MemberQuery")
	/*
		admin
	*/
	beego.Router("/admin/info", &auth.AdminController{}, "post:AdminInfo")

	beego.Router("/admin/setPassword", &admin.Controller{}, "post:SetPassword") //
	beego.Router("/admin/organization/admins", &admin.Controller{}, "get:OrganizationAdmins")
	beego.Router("/admin/organization/admin/insert", &admin.Controller{}, "post:OrganizationAdminInsert")
	beego.Router("/admin/organization/admin/delete", &admin.Controller{}, "post:OrganizationAdminDelete")
	beego.Router("/admin/organization/admin/query", &admin.Controller{}, "post:OrganizationAdminQuery")
	beego.Router("/admin/organization/admin/update", &admin.Controller{}, "post:OrganizationAdminUpdate")
	beego.Router("/admin/organization/insert", &admin.Controller{}, "post:OrganizationInsert")
	beego.Router("/admin/organization/delete", &admin.Controller{}, "post:OrganizationDelete")
	beego.Router("/admin/organization/update", &admin.Controller{}, "post:OrganizationUpdate")
	beego.Router("/admin/users", &admin.Controller{}, "get:Users")
	beego.Router("/admin/user/delete", &admin.Controller{}, "post:UserDelete")
	beego.Router("/admin/user/query", &admin.Controller{}, "post:UserQuery")
	beego.Router("/admin/user/update", &admin.Controller{}, "post:UserUpdate")
}
